%{
#include <stdio.h>
#include <string.h>
#include "y.tab.h"
%}
%%
water|fruit|grain|vegetable|liquid|meat|dairy		yylval.text=strdup(yytext); return TYPE;
boil				return FUNCBOIL;
chop				return FUNCCHOP;
bake				return FUNCBAKE;
grill				return FUNCGRILL;
fry				return FUNCFRY;
"PRINT"				return FUNCPRINT;
"=="				return EQ;
"!="				return NE;
"<"				return LT;
"<="				return LE;
">"				return GT;
">="				return GE;
"+"				return PLUS;
"-"				return MINUS;
"*"				return MULT;
"/"				return DIVIDE;
"="				return ASSIGN;
"IF"				return IF;
"ELSE"				return ELSE;
"WHILE"				return WHILE;
"DO"				return DO;
"."				return DOT;
"{" 				return TOKOBRACE;
"}" 				return TOKEBRACE;
"("				return TOKOPAREN;
")"				return TOKEPAREN;
";"				return TOKSEMI;
","				return TOKCOMMA;
times				return TOKTIMES;
[A-Za-z][A-Za-z0-9]*		yylval.text=strdup(yytext); return WORD;
[-+]?[0-9]+			yylval.integer=atoi(yytext); return INT;
[-+]?[0-9]*["."[0-9]+]?		yylval.number=atof(yytext); return NUMBER;
\".*\"				yylval.text=strncpy(calloc(strlen(yytext)-2,sizeof(char)),yytext+1,strlen(yytext)-2); return STRING;
\/\*.*\*\/			/* ignore comments */;
\n                      	/* ignore end of line */;
[ \t]+                  	/* ignore whitespace */;
%%

